package com.zhouyy.common.bean;

import java.util.Objects;


/**
 * <p> 异常相应类 </p>
 *
 * @author zhouyy
 * @description
 * @date 2024/03/26 14:59
 */
public class ValidVo {

    /**
     * 不合法的字段
     */
    private String field;

    /**
     * 提示信息
     */
    private String msg;

    public ValidVo() {
    }

    public ValidVo(String field, String msg) {
        this.field = field;
        this.msg = msg;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ValidVo validVo = (ValidVo) o;
        return Objects.equals(field, validVo.field) &&
                Objects.equals(msg, validVo.msg);
    }

    @Override
    public int hashCode() {
        return Objects.hash(field, msg);
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}